cmake_minimum_required(VERSION 3.7)

project(MagicUML)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall")

# Find the library
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(DtkWidget REQUIRED)

set(SRC_HEADERS
    UmlApplication.h
    mainwindow.h
    Utils.h
)

set(SRC_SOURCES
    UmlApplication.cpp
    mainwindow.cpp
    main.cpp
    Utils.cpp
)

set(QRC
    resources.qrc
)

add_executable(${PROJECT_NAME}
    ${SRC_HEADERS}
    ${SRC_SOURCES}
    ${QRC}
)

target_include_directories(MagicUML PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR})
target_link_libraries(MagicUML
    ${DtkWidget_LIBRARIES}
    ${Qt5Widgets_LIBRARIES}
)
